package com.fht.enums;

import lombok.Getter;

/**
 *
 * 可能抛出的异常枚举
 *
 */

@Getter
public enum ManagermentSystemEnum {
    PARAM_ERROR(6,"接收参数的格式有误！"),

    //登录注册
    REGISTER_USERNAME_ERROR(14,"该用户名已重复！请重新输入"),
    REGISTER_DEVUSER_ERROR(15,"注册用户失败！"),
    ACTIVE_USER_ERROR(16,"激活账号失败！"),
    DEVUSER_NOT_ACTIVE(17,"账号未激活！"),
    LOGIN_BLANK(11,"用户名或密码不能为空!"),
    LOGIN_USERNAME_ERROR(12,"输入用户名有误！"),
    LOGIN_PASSWORD_ERROR(13,"用户名或密码有误！"),

    //增  2x
    APPINFO_ADD_ERROR(21,"添加app信息失败！"),
    APPVERSION_ADD_ERROR(22,"添加app版本信息失败！"),
    APPCATEGORY_ADD_ERROR(23,"添加APP分类信息失败！"),

    //删  3x
    DELEVE_APPINFO_ERROR(31,"删除app信息失败！"),
    APPCATEGORY_DELETE_ERROR(32,"删除APP分类信息失败！"),

    //改  4x
    UP_APPINFO_ERROR(41,"修改APP信息为上架 失败！"),
    APPIFNO_UPDATE_VERSIONID_ERROR(42,"修改app信息中的版本号失败！"),
    APPCATEGORY_UPDATE_ERROR(43,"修改APP分类信息失败！"),
    APPIFNO_UPDATE_ERROR(44,"修改APP信息失败！"),

    //查  6x
    SELECT_APPCATEGORY_ERROR(61,"查询分级类型失败！！"),

    //文件 5x
    UPLOAD_SIZE_ERROR(51,"上传文件过大！"),
    UPLOAD_TYPE_ERROR(52,"上传文件格式错误！请上传图片"),
    UPLOAD_DAMAGE(53,"上传文件已损坏！"),
    UPLOAD_FILE_BLANK(54,"上传文件不能为空！"),
    FOOD_CATEGORY_ADD_REPETITION(29,"内容已存在！" ), PARM_INCOMPLETE(28,"传入参数不完整！" );

    private Integer code;

    private String msg;

    ManagermentSystemEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
